home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Developer Toolbox 6.1
/
SGI Developer Toolbox 6.1 - Disc 4.iso
/
public
/
tuner
/
tuner_volume.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-08-01
|
481b
|
30 lines
#include "tuner.h"
#ifdef VOLUME
#include <audio.h>
setvolume(value)
int value;
{
long par[4];
par[0] = AL_LEFT_SPEAKER_GAIN;
par[1] = value;
par[2] = AL_RIGHT_SPEAKER_GAIN;
par[3] = value;
ALsetparams(AL_DEFAULT_DEVICE, par, 4);
}
getvolume()
{
long par[4];
int value;
par[0] = AL_LEFT_SPEAKER_GAIN;
par[2] = AL_RIGHT_SPEAKER_GAIN;
ALgetparams(AL_DEFAULT_DEVICE, par, 4);
return (par[1]+par[3]) / 2;
}
#endif /* VOLUME */